package org.mikeliu.review.exp1;

import java.util.Scanner;

class Square
{
	private int edge;

	public Square() 
	{
		edge=2;
		System.out.println("this is constructor method");
	}

	public int getEdge() 
	{
		return edge;
	}

	public void setEdge(int edge) 
	{
		if(edge<=0)this.edge=1;
		else this.edge = edge;
	}
	
	public int getArea() 
	{
		return edge*edge;
	}
	
}

public class Main 
{
	public static void main(String[] args) {
		Square s1=new Square();
		System.out.println("s1:edge="+s1.getEdge());
		System.out.println("s1:area="+s1.getArea());
		Scanner scanner=new Scanner(System.in);
		Square s2=new Square();
		s2.setEdge(scanner.nextInt());
		System.out.println("s1:edge="+s1.getEdge());
		System.out.println("s1:area="+s1.getArea());
		scanner.close();
	}
}
